import requests

# 构造session对象
session = requests.Session()

# 模拟登录，获取cookie信息
login_url = "http://www.example.com/login"
data = {"username": "your_username", "password": "your_password"}
session.post(login_url, data=data)

# 使用session对象发送请求，自动处理cookie信息
url = "http://www.example.com/data"
response = session.get(url)

# 解析响应内容
data = response.json()